<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
        .box{
            border:1px solid;
            width:100px;
            height:100px;
        }
    </style>
</head>
<body>
    <h1>获取页面中的元素标签对象</h1><hr>
    <div class="box" id="box"></div>
    <script>
        var box = document.getElementById('box');
        console.log(box);
        box.style.backgroundColor = '#F7EED6';
        console.log(box.style); // 获取页面中元素的css属性;
        console.log(box.style.color); // 获取具体css属性
    </script>
</body>
</html>